using KernelSyntaxExample.Utils;
using Microsoft.SemanticKernel;

namespace SemanticKernelBlazorDemo.Shared.Services;

public class KernelFactory : IKernelFactory {
    public IKernel Produce() =>
        new KernelBuilder().Configure(p => {
            p.AddAzureChatCompletionService(
                ProjectEnvironment.Get(ProjectEnvironment.AoaiDeploymentName),
                ProjectEnvironment.Get(ProjectEnvironment.AoaiEndpoint),
                ProjectEnvironment.Get(ProjectEnvironment.AoaiKey));
        }).Build();
}